/**
 *
 * @author 
 *
 */
class LoginScene extends BaseScene 
{       
    private idTimeout:number = 0;
    private loadmc:eui.Image = new eui.Image();
    private loadIndex:number = 0;

    public constructor() 
    {
        super();
    }

    protected onCreate(): void
    {
        let bg:eui.Image = new eui.Image("game_bg_jpg");
        this.addChild(bg);

        let mc:gameMovieClip = new gameMovieClip("loading", -1);
		//this.addChild(mc);
        mc.x = 100;
        mc.y = 100;

        let mc1:gameMovieClip = new gameMovieClip("loadingI", -1);
		//this.addChild(mc1);
        mc1.x = 200;
        mc1.y = 100;

        this.idTimeout = egret.setInterval(this.playMcFunc, this, 500);
    }

    private playMcFunc():void
    {   
        this.loadIndex++;
        if(this.loadIndex > 8)
        {
            //egret.clearInterval(this.idTimeout);
            //return
            this.loadIndex = 1;
        }
        this.loadmc.alpha = 1;
        this.loadmc.source = `jm_role_${this.loadIndex}_png`
		this.addChild(this.loadmc);
        this.loadmc.x = 50;
        this.loadmc.y = 0;

        var idTimeout:number = egret.setTimeout((arg)=>{
            this.loadmc.alpha = 0.3;
            egret.clearTimeout(idTimeout);
        }, this, 400);
    }
    
    private login(): void 
    {
        
       
    }

    private onLongTimer():void
    {
       // 当前界面需要处理超时的动作
    }
    
}
